package 笔试.中兴.最大平均子区间;

import java.util.Scanner;
//最大平均子区间
public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int [] arr=new int[n];
        for (int i = 0; i < n; i++)
        {
            arr[i]=sc.nextInt();
        }
        int [] dp=new int[n];
        dp[0]=arr[0];
        int max=arr[0];
        for (int i = 1; i < n; i++)
        {
            dp[i]=Math.max((dp[i-1]+arr[i])/(i+1),arr[i]);
            max=Math.max(max,dp[i]);
        }
        System.out.println(max);
    }

}
